//
//  TipsViewController.m
//  LYKitDemo
//
//  Created by Mac-Mini-KingVision on 16/1/22.
//  Copyright © 2016年 LiuWenYang. All rights reserved.
//

#import "TipsViewController.h"
#import "LYProgressHUDManager.h"
#import "GiFHUD.h"
#import "LYGifHUD.h"
#import "ReactiveCocoa.h"
#import "UIView+Hide.h"

@interface TipsViewController ()


@end

@implementation TipsViewController

-(void)viewDidLoad
{
    [super viewDidLoad];
//    [GiFHUD showInView:self.view andisHideView:YES];
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GiFHUD dismissInView:self.view];
//    });

    
    [self.view hideAllSubViews];
    
    [self.gifhud show];
    @weakify(self);
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        @strongify(self);
        [self.gifhud dismiss];
        [self.view showAllSubViews];
    });
    
    
}

//-(void)dealloc
//{
//    [self.hud dismiss];
//}

- (IBAction)Hud:(id)sender {
    [self.view hideAllSubViews];
    
    [self.gifhud show];
    @weakify(self);
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        @strongify(self);
        [self.gifhud dismiss];
        [self.view showAllSubViews];
    });

    
}
- (IBAction)hud2:(id)sender {
    [self.gifhud show];
    @weakify(self);
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        @strongify(self);
        [self.gifhud dismiss];
    });
}

@end
